=128?"#000":"#fff"},getLuminance:function(e){var t=parseInt(this.normaliseHex(e),16),i=38+(t>>16),n=38+(t>>8&255),o=38+(255&t);return"#"+(16777216+65536*(i<255?i<1?0:i:255)+256*(n<255?n<1?0:n:255)+(o<255?o<1?0:o:255)).toString(16).slice(1)},isMobile:function(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},isPlainObject:function(e){return"object"==typeof e&&null!==e&&e.constructor==Object},traverseDOMPath:function(e,i){return e&&e.parentNode?t.hasClass(e,i)?e:this.traverseDOMPath(e.parentNode,i):null}};e.status={deny:"deny",allow:"allow",dismiss:"dismiss",allowall:"allowall",savesettings:"savesettings",detailed:"detailed"},e.transitionEnd=function(){var e=document.createElement("div"),t={t:"transitionend",OT:"oTransitionEnd",msT:"MSTransitionEnd",MozT:"transitionend",WebkitT:"webkitTransitionEnd"};for(var i in t)if(t.hasOwnProperty(i)&&void 0!==e.style[i+"ransition"])return t[i];return""}(),e.hasTransition=!!e.transitionEnd;var i=Object.keys(e.status).map(t.escapeRegExp);e.customStyles={},e.Popup=function(){var n={enabled:!0,container:null,cookie:{name:"cookieconsent_status",path:"/",domain:"",expiryDays:365,secure:!1},onPopupOpen:function(){},onPopupClose:function(){},onInitialise:function(e){},onStatusChange:function(e,t){},onRevokeChoice:function(){},onNoCookieLaw:function(e,t){},content:{header:"Cookies used on the website!",message:"This website uses cookies to ensure you get the best experience on our website.",dismiss:"Got it!",allow:"Allow cookies",deny:"Decline",savesettings:"Save Settings",link:"Learn more",href:"https://www.cookiesandyou.com",close:"❌",target:"_blank",policy:"Cookie Policy"},elements:{header:' ',message:'{{message}}',messagelink:'{{message}} {{link}}',messageswitchlink:'{{message}} {{link}}{{allswitches}}
',dismiss:'{{dismiss}}',allow:'{{allow}}',deny:'{{deny}}',savesettings:'{{savesettings}}',allowall:'{{allow}}',link:'{{link}}',close:'{{close}}',switch:'{{label}}'},window:'\x3c!--googleoff: all--\x3e{{children}}\x3c!--googleon: all--\x3e
',revokeBtn:'{{policy}}
',blockingScreen:'',blockScreen:!1,compliance:{info:'{{dismiss}}
',"opt-in":'{{deny}}{{allow}}
',"opt-out":'{{deny}}{{allow}}
',detailed:'{{savesettings}}
',detailedRev:'{{savesettings}}{{allowall}}
'},type:"info",layouts:{basic:"{{messagelink}}{{compliance}}","basic-close":"{{messagelink}}{{compliance}}{{close}}","basic-header":"{{header}}{{message}}{{link}}{{compliance}}",detailed:"{{messageswitchlink}}{{compliance}}"},cookietypes:null,layout:"basic",position:"bottom",theme:"block",static:!1,palette:null,revokable:!0,animateRevokable:!0,showLink:!0,dismissOnScroll:!1,dismissOnTimeout:!1,dismissOnWindowClick:!1,ignoreClicksFrom:["cc-revoke","cc-btn"],autoOpen:!0,autoAttach:!0,whitelistPage:[],blacklistPage:[],overrideHTML:null};function o(){this.initialise.apply(this,arguments)}function s(e){this.openingTimeout=null,t.removeClass(e,"cc-invisible")}function c(t){t.style.display="none",t.removeEventListener(e.transitionEnd,this.afterTransition),this.afterTransition=null}function a(){var e=this.options.position.split("-"),t=[];return e.forEach(function(e){t.push("cc-"+e)}),t}function r(){var e=this.options,i="top"==e.position||"bottom"==e.position?"banner":"floating";return t.isMobile()&&(i="floating"),i}function l(n){var o=this.options,s=document.createElement("div"),c=o.container&&1===o.container.nodeType?o.container:document.body;s.innerHTML=n;var a=s.children[0];return a.style.display="none",t.hasClass(a,"cc-window")&&e.hasTransition&&t.addClass(a,"cc-invisible"),this.onButtonClick=function(n){var o=t.traverseDOMPath(n.target,"cc-btn")||n.target;if(t.hasClass(o,"cc-btn")){var s=o.className.match(new RegExp("\\bcc-("+i.join("|")+")\\b")),c=s&&s[1]||!1;c&&(this.setStatus(c),this.close(!0))}t.hasClass(o,"cc-close")&&(this.setStatus(e.status.dismiss),this.close(!0));t.hasClass(o,"cc-revoke")&&this.revokeChoice()}.bind(this),a.addEventListener("click",this.onButtonClick),o.autoAttach&&(c.firstChild?c.insertBefore(a,c.firstChild):c.appendChild(a)),a}function h(e){return"000000"==(e=t.normaliseHex(e))?"#222":t.getLuminance(e)}function u(e,t){for(var i=0,n=e.length;i=0;o&&t(n);return o}.call(this)&&(this.options.enabled=!1),u(this.options.blacklistPage,location.pathname)&&(this.options.enabled=!1),u(this.options.whitelistPage,location.pathname)&&(this.options.enabled=!0);var o=this.options.window.replace("{{classes}}",function(){var i=this.options;positionStyle=r.call(this);var n=["cc-"+positionStyle,"cc-type-"+i.type,"cc-theme-"+i.theme];i.static&&n.push("cc-static");n.push.apply(n,a.call(this));(function(i){var n=t.hash(JSON.stringify(i)),o="cc-color-override-"+n,s=t.isPlainObject(i);this.customStyleSelector=s?o:null,s&&function(i,n,o){if(e.customStyles[i])return void++e.customStyles[i].references;var s={},c=n.popup,a=n.button,r=n.highlight,l=n.switches;c&&(c.text=c.text?c.text:t.getContrast(c.background),c.link=c.link?c.link:c.text,s[o+".cc-window"]=["color: "+c.text,"background-color: "+c.background],s[o+".cc-revoke"]=["color: "+c.text,"background-color: "+c.background],s[o+" .cc-link,"+o+" .cc-link:active,"+o+" .cc-link:visited"]=["color: "+c.link],a&&(a.text=a.text?a.text:t.getContrast(a.background),a.border=a.border?a.border:"transparent",s[o+" .cc-btn"]=["color: "+a.text,"border-color: "+a.border,"background-color: "+a.background],a.padding&&s[o+" .cc-btn"].push("padding: "+a.padding),"transparent"!=a.background&&(s[o+" .cc-btn:hover, "+o+" .cc-btn:focus"]=["background-color: "+(a.hover||h(a.background))]),r?(r.text=r.text?r.text:t.getContrast(r.background),r.border=r.border?r.border:"transparent",s[o+" .cc-highlight .cc-btn:first-child"]=["color: "+r.text,"border-color: "+r.border,"background-color: "+r.background]):s[o+" .cc-highlight .cc-btn:first-child"]=["color: "+c.text]));l&&(s[".cc-slider"]=["background-color: "+l.background+"!important"],s[".cc-slider:before"]=["background-color: "+l.switch+"!important"],s[".cc-switch-label"]=["color: "+l.text],s["input:checked+.cc-slider"]=["background-color: "+l.backgroundChecked+"!important"],s["input:focus+.cc-slider"]=["background-color: "+l.backgroundChecked+"!important"]);var u=document.createElement("style");document.head.appendChild(u),e.customStyles[i]={references:1,element:u.sheet};var d=-1;for(var p in s)s.hasOwnProperty(p)&&u.sheet.insertRule(p+"{"+s[p].join(";")+"}",++d)}(n,i,"."+o);return s}).call(this,this.options.palette);this.customStyleSelector&&n.push(this.customStyleSelector);return n}.call(this).join(" ")).replace("{{children}}",function(){var e={},i=this.options;i.showLink||(i.elements.link="",i.elements.messagelink=i.elements.message);if(i.cookietypes){var n="",o=this.options.cookie;i.cookietypes.forEach(function(e){var s=e.checked,c=t.getCookie(o.name+"_"+e.cookie_suffix);"deny"===c&&(s=""),"allow"===c&&(s="checked"),n+=i.elements.switch.replace(/\{\{cc\-cookietype\-id\}\}/g,e.cookie_suffix).replace(/\{\{label\}\}/g,e.label).replace(/\{\{checked\}\}/g,s).replace(/\{\{disabled\}\}/g,e.disabled).replace(/\{\{theme\}\}/g,i.theme)}),i.elements.messageswitchlink=i.elements.messageswitchlink.replace(/\{\{allswitches\}\}/g,n).replace("{{allswitchesclasses}}",function(){positionStyle=r.call(this);var e=["cc-"+positionStyle];this.customStyleSelector&&e.push(this.customStyleSelector);return e}.call(this).join(" "))}Object.keys(i.elements).forEach(function(n){e[n]=t.interpolateString(i.elements[n],function(e){var t=i.content[e];return e&&"string"==typeof t&&t.length?t:""})});var s=i.compliance[i.type];s||(s=i.compliance.info);e.compliance=t.interpolateString(s,function(t){return e[t]});var c=i.layouts[i.layout];c||(c=i.layouts.basic);return t.interpolateString(c,function(t){return e[t]})}.call(this)),s=this.options.overrideHTML;if("string"==typeof s&&s.length&&(o=s),this.options.static){var c=l.call(this,''+o+"
");c.style.display="",this.element=c.firstChild,this.element.style.display="none",t.addClass(this.element,"cc-invisible")}else this.element=l.call(this,o);(function(){var i=this.setStatus.bind(this),n=this.close.bind(this),o=this.options.dismissOnTimeout;"number"==typeof o&&o>=0&&(this.dismissTimeout=window.setTimeout(function(){i(e.status.dismiss),n(!0)},Math.floor(o)));var s=this.options.dismissOnScroll;if("number"==typeof s&&s>=0){var c=function(t){window.pageYOffset>Math.floor(s)&&(i(e.status.dismiss),n(!0),window.removeEventListener("scroll",c,{passive:!0}),this.onWindowScroll=null)};this.options.enabled&&(this.onWindowScroll=c,window.addEventListener("scroll",c,{passive:!0}))}var a=this.options.dismissOnWindowClick,r=this.options.ignoreClicksFrom;if(a){var l=function(o){for(var s=!1,c=o.path.length,a=r.length,h=0;ho&&(i=!0),i?t.hasClass(n,"cc-active")||t.addClass(n,"cc-active"):t.hasClass(n,"cc-active")&&t.removeClass(n,"cc-active")},200);this.onMouseMove=o,window.addEventListener("mousemove",o)}}}.call(this),this.options.autoOpen&&this.autoOpen(),function(){try{link=document.getElementById("nsc_bar_link_show_banner")}catch(e){link=null}this.shortCodeLink=function(){this.revokeChoice()}.bind(this),link&&link.addEventListener("click",this.shortCodeLink)}.call(this)},o.prototype.destroy=function(){this.onButtonClick&&this.element&&(this.element.removeEventListener("click",this.onButtonClick),this.onButtonClick=null),this.dismissTimeout&&(clearTimeout(this.dismissTimeout),this.dismissTimeout=null),this.onWindowScroll&&(window.removeEventListener("scroll",this.onWindowScroll),this.onWindowScroll=null),this.onWindowClick&&(window.removeEventListener("click",this.onWindowClick),this.onWindowClick=null),this.onMouseMove&&(window.removeEventListener("mousemove",this.onMouseMove),this.onMouseMove=null),this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=null,this.revokeBtn&&this.revokeBtn.parentNode&&this.revokeBtn.parentNode.removeChild(this.revokeBtn),this.revokeBtn=null,this.blockingScreen&&this.blockingScreen.parentNode&&this.blockingScreen.parentNode.removeChild(this.blockingScreen),this.blockingScreen=null,function(i){if(t.isPlainObject(i)){var n=t.hash(JSON.stringify(i)),o=e.customStyles[n];if(o&&!--o.references){var s=o.element.ownerNode;s&&s.parentNode&&s.parentNode.removeChild(s),e.customStyles[n]=null}}}(this.options.palette),this.options=null},o.prototype.open=function(t){if(this.element)return this.isOpen()||(function(){if(1!=this.options.blockScreen)return!1;var e=this.options.blockingScreen;this.blockingScreen=l.call(this,e),this.blockingScreen.style.display=""}.call(this),e.hasTransition?this.fadeIn():this.element.style.display="",1==this.options.revokable&&this.toggleRevokeButton(),this.options.onPopupOpen.call(this)),this},o.prototype.close=function(t){if(this.element)return this.isOpen()&&(e.hasTransition?this.fadeOut():this.element.style.display="none",this.blockingScreen&&this.blockingScreen.parentNode&&this.blockingScreen.parentNode.removeChild(this.blockingScreen),this.blockingScreen=null,t&&1==this.options.revokable&&this.toggleRevokeButton(!0),this.options.onPopupClose.call(this)),this},o.prototype.fadeIn=function(){var i=this.element;if(e.hasTransition&&i&&(this.afterTransition&&c.call(this,i),t.hasClass(i,"cc-invisible"))){if(i.style.display="",this.options.static){var n=this.element.clientHeight;this.element.parentNode.style.maxHeight=n+"px"}this.openingTimeout=setTimeout(s.bind(this,i),20)}},o.prototype.fadeOut=function(){var i=this.element;e.hasTransition&&i&&(this.openingTimeout&&(clearTimeout(this.openingTimeout),s.bind(this,i)),t.hasClass(i,"cc-invisible")||(this.options.static&&(this.element.parentNode.style.maxHeight=""),this.afterTransition=c.bind(this,i),i.addEventListener(e.transitionEnd,this.afterTransition),t.addClass(i,"cc-invisible")))},o.prototype.isOpen=function(){return this.element&&""==this.element.style.display&&(!e.hasTransition||!t.hasClass(this.element,"cc-invisible"))},o.prototype.toggleRevokeButton=function(e){this.revokeBtn&&(this.revokeBtn.style.display=e?"":"none")},o.prototype.revokeChoice=function(e){this.options.enabled=!0,this.clearStatus(),this.options.onRevokeChoice.call(this),e||this.autoOpen()},o.prototype.hasAnswered=function(t){return Object.keys(e.status).indexOf(this.getStatus())>=0},o.prototype.hasConsented=function(t){var i=this.getStatus();return i==e.status.allow||i==e.status.dismiss||i==e.status.allowall},o.prototype.autoOpen=function(e){!this.hasAnswered()&&this.options.enabled?this.open():this.hasAnswered()&&1==this.options.revokable&&this.toggleRevokeButton(!0)},o.prototype.setStatus=function(i){var n=this.options.cookie,o=t.getCookie(n.name),s=Object.keys(e.status).indexOf(o)>=0;Object.keys(e.status).indexOf(i)>=0?(t.setCookie(n.name,i,n.expiryDays,n.domain,n.path,n.secure),function(e){var i=this.options,n=this.options.cookie;i.cookietypes&&i.cookietypes.forEach(function(i){try{var o;o="allowall"==e?"allow":document.querySelector("input[id="+i.cookie_suffix+"]").checked?"allow":"deny",t.setCookie(n.name+"_"+i.cookie_suffix,o,n.expiryDays,n.domain,n.path,n.secure)}catch(e){}})}.call(this,i),this.options.onStatusChange.call(this,i,s)):this.clearStatus()},o.prototype.getStatus=function(){return t.getCookie(this.options.cookie.name)},o.prototype.clearStatus=function(){var e=this.options.cookie;t.setCookie(e.name,"",-1,e.domain,e.path)},o}(),e.Location=function(){var e={timeout:5e3,services:["ipinfo"],serviceDefinitions:{ipinfo:function(){return{url:"//ipinfo.io",headers:["Accept: application/json"],callback:function(e,t){try{var i=JSON.parse(t);return i.error?s(i):{code:i.country}}catch(e){return s({error:"Invalid response ("+e+")"})}}}},ipinfodb:function(e){return{url:"//api.ipinfodb.com/v3/ip-country/?key={api_key}&format=json&callback={callback}",isScript:!0,callback:function(e,t){try{var i=JSON.parse(t);return"ERROR"==i.statusCode?s({error:i.statusMessage}):{code:i.countryCode}}catch(e){return s({error:"Invalid response ("+e+")"})}}}},maxmind:function(){return{url:"//js.maxmind.com/js/apis/geoip2/v2.1/geoip2.js",isScript:!0,callback:function(e){window.geoip2?geoip2.country(function(t){try{e({code:t.country.iso_code})}catch(t){e(s(t))}},function(t){e(s(t))}):e(new Error("Unexpected response format. The downloaded script should have exported `geoip2` to the global scope"))}}}}};function i(i){t.deepExtend(this.options={},e),t.isPlainObject(i)&&t.deepExtend(this.options,i),this.currentServiceIndex=-1}function n(e,t,i){var n,o=document.createElement("script");o.type="text/"+(e.type||"javascript"),o.src=e.src||e,o.async=!1,o.onreadystatechange=o.onload=function(){var e=o.readyState;clearTimeout(n),t.done||e&&!/loaded|complete/.test(e)||(t.done=!0,t(),o.onreadystatechange=o.onload=null)},document.body.appendChild(o),n=setTimeout(function(){t.done=!0,t(),o.onreadystatechange=o.onload=null},i)}function o(e,t,i,n,o){var s=new(window.XMLHttpRequest||window.ActiveXObject)("MSXML2.XMLHTTP.3.0");if(s.open(n?"POST":"GET",e,1),s.setRequestHeader("Content-type","application/x-www-form-urlencoded"),Array.isArray(o))for(var c=0,a=o.length;c3&&t(s)}),s.send(n)}function s(e){return new Error("Error ["+(e.code||"UNKNOWN")+"]: "+e.error)}return i.prototype.getNextService=function(){var e;do{e=this.getServiceByIdx(++this.currentServiceIndex)}while(this.currentServiceIndex=0,revokable:t.revokable.indexOf(e)>=0,explicitAction:t.explicitAction.indexOf(e)>=0}},i.prototype.applyLaw=function(e,t){var i=this.get(t);return i.hasLaw||(e.enabled=!1,"function"==typeof e.onNoCookieLaw&&e.onNoCookieLaw(t,i)),this.options.regionalLaw&&(i.revokable&&(e.revokable=!0),i.explicitAction&&(e.dismissOnScroll=!1,e.dismissOnTimeout=!1)),e},i}(),e.initialise=function(i,n,o){var s=new e.Law(i.law);"detailed"!=i.type&&"detailedRev"!=i.type||(i.layout="detailed"),n||(n=function(){}),o||(o=function(){});var c=Object.keys(e.status),a=t.getCookie("cookieconsent_status");c.indexOf(a)>=0?n(new e.Popup(i)):e.getCountryCode(i,function(t){delete i.law,delete i.location,t.code&&(i=s.applyLaw(i,t.code)),n(new e.Popup(i))},function(t){delete i.law,delete i.location,o(t,new e.Popup(i))})},e.getCountryCode=function(t,i,n){t.law&&t.law.countryCode?i({code:t.law.countryCode}):t.location?new e.Location(t.location).locate(function(e){i(e||{})},n):i({})},e.utils=t,e.hasInitialised=!0,window.cookieconsent=e}}(window.cookieconsent||{});